#!/bin/sh
#  
#  File name:  start
#  Purpose:    Started erl-bot
#  Author:     Michailov Artiom
#

ERL_NODE=erl@bot
ERL=erl
NAME=-name

if [ ! -d /usr/bin ]
then
        exit
fi

# Start processes required for Erl-Bot

if [ ! -d /usr/bin/erl ]; then
  echo "Starting Erl-Bot is now process"
  $ERL -noinput -detached $NAME $ERL_NODE -s start &
  echo "Finished started bot successfull"
else
  echo "Not installing erlang. Plise install erlang (download: http://www.erlang.org/)"
  exit
fi
